package com.chixing.day04.test;

/**
 * @author Y2014188432
 */
public class Mainboard {
    private Cpu cpu;
    private VideoCard videoCard;

    public Mainboard(Cpu cpu, VideoCard videoCard) {
        this.cpu = cpu;
        this.videoCard = videoCard;
    }

    /**
     * 显示主板运行信息
     */
    public void run(){
        System.out.println("主板开始运行");
        videoCard.videoRunning();
        cpu.cpuRunning();
    }

    /**
     * 显示主板停止信息
     */
    public void close(){
        System.out.println("主板结束运行");
        videoCard.videoClosing();
        cpu.cpuClosing();
    }
}
